<template>
  <van-grid  :column-num="2" class="goodList">
    <van-grid-item
      v-for="obj in list"
      :key="obj.id"
      class="item"
      :to="'/goods/detail?id='+obj.id"
      
    >
      <van-image class="img" :src="obj.pic" />
      <span class="gname">{{ obj.name }}</span>
      <p class="desc">
        <van-tag type="primary" plain>{{ obj.brandName }}</van-tag>
        <span class="r">￥{{ obj.price }}</span>
      </p>
    </van-grid-item>
  </van-grid>
</template>

<script>
export default {
  name:'GoodList',
  props:{
     list:{
        type:Array,
        default:()=>[]
     }
  }
}
</script>

<style lang="less" scoped>
.goodList {
  .item {
    .gname {
      font-size: 28px;
      margin-bottom: 10px;
    }
    .desc{
      font-size: 24px;
      display: flex;
      width: 100%;
      justify-content: space-between;
    }
    .r {
      color: #e11c34;
      font-size: 28px;
    }
  }
}
</style>